{php $meta_title="淘宝客";}
{if $cid}
{php $cdata = get_taobao_cats($cid);if ($cdata['is_parent'] == 'false') $cdata = get_taobao_cats($cdata['parent_cid']);}
{php $meta_title=$cdata['name'];}
{/if}
{template header}
    <div class="navigation">
    您当前位置：<a  href="{SITE_PATH}">首页</a> >> 淘宝客
    </div>
    <div class="blank10 clear"></div>
    <!--begin-->
    <div class="piclist">
        <div class="title"><span>淘宝客</span></div>
        <div class="select-taoke">
            <ul>
            <li><a href="{url('taobaoke/index/list')}" {if !$cid}class="b"{/if}>全部</a></li>
            {php $list = get_taobao_cats(0);}
            {loop $list $t}
            {if in_array($t['cid'], array(16,30,50023282,50022517,50011699))}
            <li><a href="{url('taobaoke/index/list', array('cid'=>$t['cid']))}" {if $cid==$t['cid']}class="b"{/if}>{$t['name']}</a></li>
            {/if}
            {/loop}
            </ul>
        </div>
        {if $cdata['list']}
        <div class="select-taoke">
            <ul>
            {loop $cdata['list'] $t}
            <li><a href="{url('taobaoke/index/list', array('cid'=>$t['cid']))}" {if $cid==$t['cid']}class="b"{/if}>{$t['name']}</a></li>
            {/loop}
            </ul>
        </div>
        {/if}
        <div class="clear blank10"></div>
        <div class="piclistbox taokelist">
            <ul>
            {php $data=get_taobao_list($cid, 'commissionNum_desc', $pagesize=25, $page);} 
            {loop $data $t}
            <li>
            <div><a href="{url('taobaoke/index/show', array('id'=>$t['num_iid']))}"><img src="{$t['pic_url']}_120x120.jpg" width="140" height="100" border="0" /></a></div>
            <div class="picname"><a href="{url('taobaoke/index/show', array('id'=>$t['num_iid']))}">{$t['title']}</a></div>
            <p>价格：￥{$t['price']}</p>
            <p>地区：{$t['item_location']}</p>
            <p><a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=ad&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={urlencode($t['nick'])}&site=cntaobao&s=1&charset=utf-8" alt="点击这里给我发消息" /></a></p>
            <p><img src="{SITE_THEME}images/level_{$t['seller_credit_score']}.gif"></p>
            </li>
            {/loop}
            </ul>
            <div class="listpage">
                <a href="{url('taobaoke/index/list', array('cid'=>$cid, 'page'=>$page-1))}" class="a1">上一页</a>
	            <a href="{url('taobaoke/index/list', array('cid'=>$cid, 'page'=>$page+1))}" class="a1">下一页</a>
            </div>
       </div>
    </div>
    <!--end-->
    <div class="clear blank10"></div>
{template footer}